<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./lib/react.development.js"></script>
    <script src="./lib/react-dom.development.js"></script>
    <script src="./lib/babel.min.js"></script>
</head>
<body>
<div id="root">

</div>

</body>
<script type="text/babel">
    const root = ReactDOM.createRoot(document.querySelector("#root"));
    // 1- 组件允许使用多次
    // 2- 组件允许包含其它组件
    class App extends React.Component{
        render(){
            return (
                <div>
                    <h3>App</h3>
                    <Child/>
                    <Child/>
                    <Child/>
                    <Child/>
                </div>
            )
        }
    }
    class Child extends React.Component{
        render(){
            return (
                <div>
                    <h3>Child</h3>
                </div>
            )
        }
    }
    root.render((
        <div>
            <App/>
            <hr/>
            <Child/>
            <Child/>
        </div>
    ));
</script>
</html>